Home / Blog / Interview Questions / Python Strings Interview questions and Answers

Python Strings Interview questions and Answers

  • February 17, 2023
  • 2997
  • 91
Author Images

Meet the Author : Mr. Bharani Kumar

Bharani Kumar Depuru is a well known IT personality from Hyderabad. He is the Founder and Director of Innodatatics Pvt Ltd and 360DigiTMG. Bharani Kumar is an IIT and ISB alumni with more than 17 years of experience, he held prominent positions in the IT elites like HSBC, ITC Infotech, Infosys, and Deloitte. He is a prevalent IT consultant specializing in Industrial Revolution 4.0 implementation, Data Analytics practice setup, Artificial Intelligence, Big Data Analytics, Industrial IoT, Business Intelligence and Business Management. Bharani Kumar is also the chief trainer at 360DigiTMG with more than Ten years of experience and has been making the IT transition journey easy for his students. 360DigiTMG is at the forefront of delivering quality education, thereby bridging the gap between academia and industry.

Read More >
  • What will be the output of below python code? str = "Information" print(str[1:8])

    • a) format
    • b) formatio
    • c) orma
    • d) ormat

    Answer - a) format

    The concept of slicing is used in this question. In string slicing, the output is the substring starting from the first given index position i.e 2 to one less than the second given index position i.e.(8-1=7) of the given string str1. Hence, the output will be "format".

Make an Enquiry
Call Us