Skip to content

Instantly share code, notes, and snippets.

@goyalrohit
Last active September 22, 2019 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goyalrohit/bffe20d100c7887580496f29dea72f2a to your computer and use it in GitHub Desktop.
Save goyalrohit/bffe20d100c7887580496f29dea72f2a to your computer and use it in GitHub Desktop.
#!/usr/bin/python
#Assign string value to the variable
myText = '2019'
print(type(myText))
#convert String to Integer
intValue = int(myText)
#integer value
print(intValue)
#type of the converted value
print(type(intValue))
#concatenate with interger
print(intValue+2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment