Python3 string


  Translation results:

The 3.0 version of Python is often called Python 3000, or Py3k for short. This is a major upgrade compared to earlier versions of Python. In order not to bring too much burden, Python 3.0 was not designed with backward compatibility in mind.

Python3 stringsyntax

Strings are the most commonly used data type in Python. We can use quotes (' or ") to create strings.

Python3 stringexample

#!/usr/bin/python3
 var1 = 'Hello World!'var2 = "Runoob"
 print ("var1[0]: ", var1[0])
print ("var2[1:5]: ", var2[1:5])

Popular Recommendations

Home

Videos

Q&A