How can I fix .../Playground/?? | Sololearn: Learn to code for FREE!

+2

How can I fix .../Playground/??

print('a/b/c/d') # OUTPUT: a.../Playground/ please help me to fix this ๐Ÿ™

5/14/2022 1:47:19 PM

MD. Ferdous Ibne Abu Bakar

8 Answers

New Answer

+1

Maybe this will work for you: ๐Ÿ˜Ž print('a/b/c/d'.replace('/','\0/'))

+4

it's a SL playground issue. Works fine in other IDEs. hope these helps.. https://www.sololearn.com/Discuss/1018921/?ref=app read code comments.. https://code.sololearn.com/c6tjlgd7XOAy/?ref=app

+1

Thanks Solo ๐Ÿ˜๐Ÿ˜

+1

#My code: def Print(str): import os os.system('touch file.png') str = str.replace('/','<span>/</span>') print('<style>img{display:none}</style>'+str) Print('a/b/c/d')

+1

MD. Ferdous Ibne Abu Bakar ๐Ÿ˜ณ... oh great code ๐Ÿ‘โ˜บ๏ธ In this case, my function is: def Print(str): print(str.replace('/','\0/')) Print('a/b/c/d')

+1

Thanks ๐Ÿ‘๐Ÿ’ฏ

+1

#How can i fix this: Solo any suggestions? def x(y): y = y.replace('/','\0/') return y import os a = x('/usr/bin/ptx') print(f'Current derection: {x(os.getcwd())}') print('='*20) print(f'Changing derection to: {a}') print('='*20) try: os.chdir(a) #ValueError: embedded null byte except: os.chdir('/usr/bin/ptx') #NotADirectoryError: [Errno 20] Not a directory: '../Playground/'

+1

MD. Ferdous Ibne Abu Bakar https://code.sololearn.com/ccpMTngNDtTV/?ref=app