学习python这几天发现jion的两种用法
li = "alexericrain" v = ["_".join(li)] print (v) #第一种输出结果是['a_l_e_x_e_r_i_c_r_a_i_n'] li = ["alex","crain"] v = ["_".join(li)] print(v) #第二种输出结果是['alex_crain']
学习python这几天发现jion的两种用法
li = "alexericrain" v = ["_".join(li)] print (v) #第一种输出结果是['a_l_e_x_e_r_i_c_r_a_i_n'] li = ["alex","crain"] v = ["_".join(li)] print(v) #第二种输出结果是['alex_crain']
转载于:https://www.cnblogs.com/sucanji/p/10749487.html