Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. What is the output of the following?
print('[email protected] a'.isprintable())
Correct Answer is : TRUE
2. What is the output of the following?
print(''''''.isspace())
Correct Answer is : FALSE
3. What is the output of the following?
print('\t'.isspace())
Correct Answer is : TRUE
4. What is the output of the following?
print('HelloWorld'.istitle())
Correct Answer is : FALSE
5. What is the output of the following?
print('Hello World'.istitle())
Correct Answer is : TRUE
6. What is the output of the following?
print('[email protected]#World'.istitle())
Correct Answer is : TRUE
7. What is the output of the following?
print('[email protected]'.lower())
Correct Answer is : [email protected]
8. What is the output of the following?
print('''
\tfoo'''.lstrip())
Correct Answer is : foo
9. What is the output of the following?
print('xyyzxxyxyy'.lstrip('xyy'))
Correct Answer is : zxxyxyy
10. What is the output of the following?
print('xyxxyyzxxy'.lstrip('xyy'))
Correct Answer is : zxxy
11. What is the output of the following?
print('cba'.maketrans('abc', '123'))
Correct Answer is : {97: 49, 98: 50, 99: 51}
12. What is the output of the following?
print('a'.maketrans('ABC', '123'))
Correct Answer is : {97: 49, 98: 50, 99: 51}
13. What is the output of the following?
print('abcdef'.partition('cd'))
Correct Answer is : (‘ab’, ‘cd’, ‘ef’)
14. What is the output of the following?
print('abcdefcdgh'.partition('cd'))
Correct Answer is : (‘ab’, ‘cd’, ‘efcdgh’)
15. What is the output of the following?
print('abcd'.partition('cd'))
Correct Answer is : (‘ab’, ‘cd’, ”)
16. What is the output of the following?
print('cd'.partition('cd'))
Correct Answer is : (”, ‘cd’, ”)
17. What is the output of the following?
print('abef'.partition('cd'))
Correct Answer is : (‘abef’, ”, ”)
18. What is the output of the following?
print('abcdef12'.replace('cd', '12'))
Correct Answer is : ab12ef12
19. What is the output of the following?
print('abef'.replace('cd', '12'))
Correct Answer is : abef
20. What is the output of the following?
print('abcefd'.replace('cd', '12'))
Correct Answer is : abcefd
Similar Interview Questions
Search for latest jobs
Get $5 added to your wallet for registering an account. Refer others and get $1 for each successful referral. Earn while you search for jobs and redeem in gift cards!