
# # This is a Python Demo - String | |
# Find String Length | |
S = 'Supercalifragilisticexpialidocious' | |
print(len(S)) # 34 | |
# Replace ‘World’ with ‘Universe’ | |
X = 'Hello, World!' | |
y = X.replace('World', 'Universe') | |
print(y) # Hello, Universe! | |
# Split and Join a String | |
M = 'red,green,blue,yellow' | |
n = M.split(',') | |
print(n) # ['red', 'green', 'blue', 'yellow'] | |
print(n[0]) # red |
List of functions of “array”
arrays = "123456"
a=dir(arrays)
print(a)
['__add__'
'__class__'
'__contains__'
'__delattr__'
'__dir__'
'__doc__'
'__eq__'
'__format__'
'__ge__'
'__getattribute__'
'__getitem__'
'__getnewargs__'
'__gt__'
'__hash__'
'__init__'
'__init_subclass__'
'__iter__'
'__le__'
'__len__'
'__lt__'
'__mod__'
'__mul__'
'__ne__'
'__new__'
'__reduce__'
'__reduce_ex__'
'__repr__'
'__rmod__'
'__rmul__'
'__setattr__'
'__sizeof__'
'__str__'
'__subclasshook__'
'capitalize'
'casefold'
'center'
'count'
'encode'
'endswith'
'expandtabs'
'find'
'format'
'format_map'
'index'
'isalnum'
'isalpha'
'isascii'
'isdecimal'
'isdigit'
'isidentifier'
'islower'
'isnumeric'
'isprintable'
'isspace'
'istitle'
'isupper'
'join'
'ljust'
'lower'
'lstrip'
'maketrans'
'partition'
'removeprefix'
'removesuffix'
'replace'
'rfind'
'rindex'
'rjust'
'rpartition'
'rsplit'
'rstrip'
'split'
'splitlines'
'startswith'
'strip'
'swapcase'
'title'
'translate'
'upper'
'zfill']
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND