Python Tutorial 31 – Type Casting using int() float() and str()

Donate!: This video will have to do with data types. Sometimes in python we have to convert from one data type to another, we can use certain functions to help us do this!

More content:
Courses for Download:
Subscribe (it’s free!):

Amazing Web Hosting – (The best web hosting for a cheap price!)


Xem thêm bài viết khác:


  1. Erro: Could not convert string to float : , How to solve this error? ,
    self.totalcp = float(self.cp * self.estoque) self.totalsp = float(self.sp * self.estoque) self.lucro = float(self.sp – self.cp)

    I'm from Brazil

  2. in(5.5)
    output 5
    THis would be an example of casting am I right?

  3. Thanks, Sir, It is really helpful.
    This video related to my written article.
    Everyone can also read more details about this lecture to click at the given link as below.

  4. Really helped with my exam revision for ICT cheers mate x

  5. @woodytoob. Here is an example of a Python cast … cast(cStringVariable,c_char_p).value.decode("ascii") which casts a C style string to a Python style string.

  6. "Casting" does not exist in Python.

Leave a Reply

Your email address will not be published. Required fields are marked *