def my_join(*paths):
joined = ''
for path in paths:
sep = ''
if path[0] != '/':
sep = '/'
if path[-1] == '/':
clean_path = path[:-1]
else:
clean_path = path
joined += sep+str(clean_path)
return joined
a = 'a/c/sa/'
b = '/b'
c = 'c/'
abc = my_join(a,b,c)
print(abc)
why doesn’t it complete the task? The output is correct.