Q51. How will you convert a string to all lowercase?
In Python, convert a string to lowercase using the **`str.lower()`** method: ```python text = "HireXTech INTERVIEW Guide" print(text.lower()) # Output: "hirextech intervi...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (63 available).
In Python, convert a string to lowercase using the **`str.lower()`** method: ```python text = "HireXTech INTERVIEW Guide" print(text.lower()) # Output: "hirextech intervi...
Docstrings are not actually comments, but, they are documentation strings. These docstrings are within triple quotes. They are not assigned to any variable and therefore,...
The App Router has built-in support for streaming and React Suspense, allowing you to progressively render and stream UI to the client. ```jsx // app/page.js import { Sus...
A string in Python is a sequence of alpha-numeric characters. They are immutable objects. It means that they don't allow modification once they get assigned a value. Pyth...
For converting a number into a string, you can use the built-in function str(). If you want an octal or hexadecimal representation, use the inbuilt function oct() or hex(...
We use the lower() method for this. ```python >>> 'AyuShi'.lower() ``` 'ayushi' To convert it into uppercase, then, we use upper(). ```python >>> 'AyuShi'.upper() ``` 'AY...
Use the `.isalnum()` method on a string. It returns `True` if all characters in the string are alphanumeric (letters or numbers) and there is at least one character: ```p...
For this, we'll simply use the max function. ```python >>> max('flyiNg') ``` 'y' The following are the ASCII values for all the letters of this string- f- 102 l- 108 y- 1...
We will use the join() method for this. ```python >>> nums=['one','two','three','four','five','six','seven'] ``` >>> s=' '.join(nums) ```python >>> s ``` o/p= 'one two th...
If a string contains only numerical characters, you can convert it into an integer using the int() function. ```python >>> int('227') ``` 227 Let's check the types: ```py...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.