Convert string: to and from string : String Cast « String « Python






Convert string: to and from string

Convert string: to and from string
 

print int("42"), str(42)         # convert from/to string

print int("42") + 1            # force addition


           
         
  








Related examples in the same category

1.Content tests: isalpha, isdigit, etc
2.Strings translate
3.string to list
4.Convert int: to and from stringConvert int: to and from string