NP41 拯救被污染的字符串
思路:
step1:首先用split()切割,返回的就是列表;
step2:用join()拼接;
代码如下:
my_str = 'I am$ N$iuniu$, an$d I $am stu$dying in $Now$coder!'
my_list = my_str.split('$')
print(my_list)
print(''.join(my_list))
my_str = 'I am$ N$iuniu$, an$d I $am stu$dying in $Now$coder!'
my_list = my_str.split('$')
print(my_list)
print(''.join(my_list))