0% found this document useful (0 votes)
36 views3 pages

Assignment LPU Sept

The document contains examples of Python code snippets demonstrating the use of various string and list methods like title(), isnumeric(), join(), upper(), lower() and strip().

Uploaded by

Muskan Sharda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views3 pages

Assignment LPU Sept

The document contains examples of Python code snippets demonstrating the use of various string and list methods like title(), isnumeric(), join(), upper(), lower() and strip().

Uploaded by

Muskan Sharda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 3

25

36
list1 = [5, 10, 15, 200, 25, 50, 20]
Output : [3,2,1]
s1 = 'co what i can not cee you'
s1 = 'Name'
Output : s1 = 'Mynameissahib'
s1 = [2,4,6,8]
s1 = [1,2,3,1,2,3]
output
output = 3 = 42

output = False
output ----> [1,2,3,4]
(Hint use istitle() )
output ---> True
s1 = 'sahib is just having a coffee'
output ---> 3
output ---> s = 'Sahib likes coffee'
(Hint isnumeric() )
output ---> s1 = ['sahib' , 'wants', 'more', 'coffee']
( Hint use join function )
( Hint use upper() and lower() )
(hint
input strip
= s1 function)
='don'

Output ---> 'aetkoob'

You might also like