You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>'Python'in'Python is great!'True>>>'python'in'Python'False>>>'PYTHON'in'Python is great!'False>>>''in'python'True>>>'Python'notin'python and javascript'## Matches caseTrue
The upper(), lower(), isupper(), islower() string methods
>>>check='Hello world!'>>>check=check.lower() ## converts check to lower>>>check'hello world!'>>>check=check.isupper() ## checks whether check variable is upper or not. False>>>check=check.islower() ## checks whether check variable is upper or not. True>>>check=check.upper() ## converts check to upper>>>check'HELLO WORLD!'>>>check=check.isupper() ## checks whether check variable is upper or not. True>>>check=check.islower() ## checks whether check variable is upper or not. False
Template Strings
Template strings are a simpler mechanism which are used to handle format strings generated by users
>>>fromstringimportTemplate>>>language='Python'>>>t=Template('$name is great!')
>>>t.substitute(name=language) ## Substitutes name with language variable'Python is great!'
Pyperclip
Pyperclip is python library that help us easily copy and paste string