What is casting in python?



What is casting in python?..

Answer / Vardan Rastogi

In Python, casting refers to the process of converting an object of one data type to another. This can be achieved using built-in functions such as int(), float(), str(), and bool(). For example: int(5.6), float(3), or str('Hello').

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

Should I learn python before c?

1 Answers  


What is the output of this following statement?

1 Answers  


What is a python module?

1 Answers  


Given the first and last names of all employees in your firm, what data type will you use to store it?

1 Answers  


What is the difference between list and tuple?

1 Answers  


What is asynchronous python?

1 Answers  


What is the difference between `list` and `tuple` in Python?

2 Answers  


What is the purpose of the single underscore “_” variable in python?

1 Answers  


How many kinds of operators do we have in python? Explain arithmetic operators?

1 Answers  


What tools can be used to unit test your python code?

1 Answers  


What companies use python?

1 Answers  


What is dict when we have to use ?

1 Answers  


Categories