Convert string to a list and add them together : list « Buildin Function « Python






Convert string to a list and add them together

Convert string to a list and add them together

print [1, 2] + list("34")     # same as [1, 2] + ["3", "4"]

           
       

Related examples in the same category

1.Change string to a listChange string to a list
2.Change string to a list and Reference its index Change string to a list and Reference its index
3.Join list to a stringJoin list to a string