# string.join()
# join() function between two string insert a string
# join() function for list
# join() function between two string insert a string
# join() function for list
name = ["Anik", "Jack", "Jon", "David", "Tom"]
modify_list = " , ".join(name)
print(modify_list)
# join() function for set
set = {'HTML', 'CSS', 'Javascript', 'C', 'C++', 'Python'}
symbol = ' -> '
modify_set = symbol.join(set)
print(modify_set)
#################################
set = {"name_" : "Anik", "_age" : "14"}
string = "ADD"
modify_set = string.join(set)
print(modify_set)
Comments
Post a Comment