Python Multiple Choice Questions And Answers
Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:
example = "snow world" print("%s" % example[4:7])
Execute in the shell and verify.
max("what are you")
Max returns the character with the highest ascii value.
example = "helle" example.rfind("e")
Returns highest index.
w="hello" v=('a', 'e', 'i', 'o', 'u')
The tuple ‘v’ is used to generate a list containing only vowels in the string ‘w’. The result is a list containing only vowels present in the string “hello”. Hence the required list comprehension is: [x for x in w if x in v].
- [x for w in v if x in v]
- [x for x in w if x in v]
- [x for x in v if w in v]
- [x for v in w for x in w]