DEV Community

Ega Prasetya
Ega Prasetya

Posted on

2 1

Python Tricks - Functions to change Data Type

  1. int () to convert to integer;
  2. long () to change to an integer length;
  3. float () to change to float;
  4. bool () to change to boolean;
  5. chr () to change to character;
  6. str () to convert to a string.
  7. bin () to convert to Binary numbers.
  8. hex () to convert to Hexadecimal numbers.
  9. oct () to convert to octane numbers.

Thanks for read my docs, hope enjoy it.

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay