Python Strings

Master Python with 70+ Hands-on Projects and Get Job-ready - Learn Python

Program 1

# String methods

# s="dataflair indore"
# s=s.upper()
# print(type(s))
# print(type(s))
#print(id(s))
#print(s)
# s="TECH VIDVAN INDORE"
# print(s.lower())
# s=input("Enter A String")
# m=s.count("D")
# print(m)
# email=input("Enter email id: ")
# m=email.find('@')
# n=email.find('.',m+1)
# if(m==-1):
#     print("Invalid email id")
# elif(n==-1):
#     print("Invalid email id")
# else:
#     print("-------Valid email id--------")    
# print(m)
# print(n)

#s=input("Enter A String")
#print(s.index('i',5))
#print(s.index('i'))
# print(s.strip())
#print(s.lstrip())
#print(s.rstrip())

#s=input("Enter A String")
#print(s.startswith("Dr"))
#print(s.endswith("."))
#print(s.capitalize())
#print(s.title())
# print(s.islower())
# print(s.isupper())
#print(s.isdigit())
#print(s.istitle())

# rno=int(input("Enter Roll No"))
# name=input("Enter Your Name")
# per=float(input("Enter Precentage"))
# s="Roll No is {0} and  Name is {1} and Precentage is {2}"
# print(s.format(rno,name,per))

 

You give me 15 seconds I promise you best tutorials
Please share your happy experience on Google

courses

DataFlair Team

DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.

Leave a Reply