Welcome to www.mcqtutorial.com!!!!
      
      
MCQ Tutorial Search
Home Search Add Question Today's History Discussion Board Job Portal Python Basics Core Data Types

String

List Mock Test Contact Feedback
Home
Search
Add Question
Today's History
Discussion Board
Job Portal
Python
Basics
Core Data Types

String

List
Mock Test
Subscribe/Unsubscribe
Email:
Social Media
Facebook

Misc Tutorials

References

Question and Answer Tutorial
Tutorials Point
Stack Overflow

MCQ Tutorial - Python->String

Previous 1 2 Next
1.) What is the output when following statement is executed?

>>>"a"+"bc"
Options are:
A.) bc
B.) abc
C.) bca
D.) a
2.) What is the output when following statement is executed?

>>>"abcd"[2:]
Options are:
A.) bc
B.) cd
C.) da
D.) ab
3.) The output of executing string.ascii_letters can also be achieved by
Options are:
A.) string.lowercase_string.upercase
B.) string.letters
C.) string.ascii_lowercase+string.ascii_upercase
D.) string.ascii_lowercase_string.digits
4.) What is the output when following code is executed?

>>> str1 = 'hello'
>>> str2 = ','
>>> str3 = 'world'
>>> str1[-1:]
Options are:
A.) elloh
B.) ohell
C.) ello
D.) o
5.) What is the output when following code is executed?

>>>print r"
hello"
Options are:
A.) Error
B.) a new line and hello
C.) the letter r and then hello
D.)
hello
Previous 1 2 Next
                        
Comment:
Name:Email:
Contact No.:
Copyright © 2014 by SBJ Group. All Rights Reserved. Developed and maintained by SBJ Group. Supported on Internet Explorer browser only