Q. What would following expression return?
(a) "Hello World".upper().lower()
(b) "Hello World".lower().upper()
(c) "Hello World".find( "Wor", 1, 6)
(d) "Hello World".find( "Wor")
(e) "Hello World".find( “wor”)
(f) "Hello World".isalpha()
(g) "Hello World".isalnum()
(h) "1234".isdigit()
(i) "123FGH".isdigit()
You can understand by Watching video :-
Answer :-
(A) = 'hello world'
(B) = 'HELLO WORLD'
(c) = -1
(D) = 6
(E) = -1
(F) = False
(g) = True
(h) = True
(I) = False
hey in c part the answer is -1 plz check it first
ReplyDeleteSorry, I have corrected it.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )