# Implicit vs Explicit Conversion

## Implicit vs Explicit Conversion

### Description

There are numerous types of data in Python programming. We must know their inter-conversion. How to covert these data types using inbuilt functions in Python i.e. Type Casting? Performing type conversions is one of the many things we can do with Python’s functions.

Let’s first discuss the Python data types in brief before proceeding towards topic.

### Integers

Python gives any number without a prefix as an integer. The values of integer may be as long as we want . These are digits too in Python. We can’t have forever long integers if we have a supercomputer. These numbers also contain decimal digits.

### Floating Point Numbers

For splitting the fractional digits and the integer floats are numbers that are written with a decimal point. Example of floating point numbers are 5.2, 8.17,3.31 etc.

### Complex Numbers

In Python, complex numbers display this format:(the real part + the imaginary part). Examples of complex numbers are (4+1i), (6-4x), etc.

### Strings

These may be any specific set of characters. Strings are referred to as str. We can write them by using quotation marks. We can use single quotes as well as double quotes for writing strings in Python. Strings can be any characters placed in quotation marks such as ‘9.1’, “hello”, etc.

### Boolean Data Type

Boolean data my have one of two values, which are true and false. Boolean values are pretty vital in Python for different reasons. We can use Boolean values to define the truthiness of objects and values.

### Type Conversion

Implicit conversion

• Some data types are often mixed and matched thanks to implicit conversion.
• Implicit conversion is where the interpreter helps us out and automatically converts one data type into another, without having to explicitly tell it to try to to so.

Explicit conversion

• Against this ,explicit conversion is where we manually convert from one data type to a different by calling the relevant function for the info type we would like to convert to.
• Once we wanted to print variety alongside some text.Before we could do this ,we needed to call the str () function to convert the amount into a string.
• Once the amount was explicitly converted to a string,we could join it with the remainder of our textual string and print the result.

We should must familiar with some type conversion functions to perform typecasting in Python.

• Int (a, base) is a  popular function as it can convert any data type into an integer.
• float ( ) can turn any data type into a floating-point number.
• Oct ( ) converts integers to octal strings, and hex ( ) converts integers to hexadecimal strings.

### 2 thoughts on “Implicit vs Explicit Conversion”

1. Good work

2. Best view i have ever seen !
{"ft_lang_label":"__label__en","ft_lang_prob":0.85821974,"math_prob":0.9470506,"size":2713,"snap":"2021-31-2021-39","text_gpt3_token_len":561,"char_repetition_ratio":0.13990402,"word_repetition_ratio":0.0043572984,"special_character_ratio":0.20973092,"punctuation_ratio":0.10485437,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.95133364,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-20T11:45:23Z\",\"WARC-Record-ID\":\"<urn:uuid:213c2ead-7d42-4eb2-bd78-b32bb92396a2>\",\"Content-Length\":\"47096\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:13ffcfdf-e52e-4f3b-b409-cdd6dbbccbe2>\",\"WARC-Concurrent-To\":\"<urn:uuid:d09f31b9-4555-4632-a3fb-020c47ab82aa>\",\"WARC-IP-Address\":\"164.132.74.123\",\"WARC-Target-URI\":\"https://www.technologiesinindustry4.com/2020/09/implicit-vs-explicit-conversion.html\",\"WARC-Payload-Digest\":\"sha1:7AJX2USXLO46P2QMKRQORAR6KG5A3OXU\",\"WARC-Block-Digest\":\"sha1:GEEHNNMQM4KR4AWKXGTK4ZR4H4ZEDM7Q\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057036.89_warc_CC-MAIN-20210920101029-20210920131029-00497.warc.gz\"}"}