python string method
python string method
s1[3] Returns 4th element of s1 (s) >10d Reserves 10 spaces to the int and align the content right
s1[0:3] Returns 1st to 3rd element of s1 (thi) *^10d Reserves 10 spaces to the int , centralize the content and fill
the empty spaces with *
s1[0:7:2] Returns 1st to 7th element of s1 skipping one at a
time (ti s) 0>10d Reserves 10 spaces to the int , align the content right and fill
the empty spaces with 0s
s = "stRing" 0>10.2f Reserves 10 spaces to the float and format with 2 decimal
places
s.capitalize() Returns capitalized version of s (String)
s.upper() Returns upper case version of s (STRING) String - The format() Method