• +91 9971497814
  • info@interviewmaterial.com

Computer Interview Questions Answers

PYTHON Interview Questions Answers

Question - 101 : - Normal 0 false false false EN-US X-NONE X-NONE

Answer - 101 : - Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 To copy an object in Python, you can try copy.copy () or copy.deepcopy() for the general case. You cannot copy all objects but most of them. /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

Question - 102 : - Normal 0 false false false EN-US X-NONE X-NONE

Answer - 102 : - Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Pickle module accepts any Python object and converts it into a string representation and dumps it into a file by using dump function, this process is called pickling.  While the process of retrieving original Python objects from the stored string representation is called unpickling. /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

Question - 103 : - Normal 0 false false false EN-US X-NONE X-NONE

Answer - 103 : - Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 It is a single expression anonymous function often used as inline function. /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

Question - 104 : - How will you check in a string that it is properly titlecased?

Answer - 104 : - istitle() − Returns true if string is properly "titlecased" and false otherwise.

Question - 105 : - How will you get the min valued item of a list?

Answer - 105 : - min(list) − Returns item from the list with min value.

Question - 106 : - How will you replaces all occurrences of old substring in string with new string?

Answer - 106 : - replace(old, new [, max]) − Replaces all occurrences of old in string with new or at most max occurrences if max given.

Question - 107 : - How will you convert an integer to octal string in python?

Answer - 107 : - oct(x) − Converts an integer to an octal string.

Question - 108 : - What are the supported data types in Python?

Answer - 108 : - Python has five standard data types −1.Numbers, 2.String,3.List,4.Tuple,5.Dictionary

Question - 109 : - How will you convert an integer to a character in python?

Answer - 109 : - chr(x) − Converts an integer to a character.

Question - 110 : - Normal 0 false false false EN-US X-NONE X-NONE

Answer - 110 : - Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 The difference between list and tuple is that list is mutable while tuple is not. Tuple can be hashed for e.g as a key for dictionaries. /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;}

Computer Contributors

krishan
Rajeev Katiyar
Yes Baroda

Share your email for latest updates

Name:
Email:

Our partners