Home >Backend Development >Python Tutorial >Strings in python programming
string in programming
a="Hello"
b="Avinash"
print(a,b)
a="My name is Avinash"
print(a)
a="""My name is Avinash.I am come to keeramangalam,str(age(19)"""
print(a)
a="Avinash"
print(a[4])
a="Avinash"
print(len(a))
txt="The best beauitiful in india"
print("India" in txt)
a="Hello world"
print(a.upper())
a="Hello world"
print(a.lower())
a="Helllo world"
print(a.replace("h","r"))
a="Hello world"
print(a.strip())
a="Hello"
b="Avinash"
c=(a+b)
print(c)
a="Hello"
b="world"
print(a+""+b)
age=10
txt=f"My name is Avinash,Iam{age}"
print(txt)
o/p
Hello Avinash
My name is Avinash
My name is Avinash.I am come to keeramangalam,str(age(19)
a
7
False
HELLO WORLD
hello world
Helllo world
Hello world
HelloAvinash
Helloworld
My name is Avinash,Iam10
The above is the detailed content of Strings in python programming. For more information, please follow other related articles on the PHP Chinese website!