Computer Science, asked by BoyWhoCode, 1 year ago

Python3
__________

Write The Python Data Types...

#BoyWhoCode

Answers

Answered by hardikmishra200
1
S.No.Function & Description1

int(x [,base])

Converts x to an integer. The base specifies the base if x is a string.

2

float(x)

Converts x to a floating-point number.

3

complex(real [,imag])

Creates a complex number.

4

str(x)

Converts object x to a string representation.

5

repr(x)

Converts object x to an expression string.

6

eval(str)

Evaluates a string and returns an object.

7

tuple(s)

Converts s to a tuple.

8

list(s)

Converts s to a list.

9

set(s)

Converts s to a set.

10

dict(d)

Creates a dictionary. d must be a sequence of (key,value) tuples.

11

frozenset(s)

Converts s to a frozen set.

12

chr(x)

Converts an integer to a character.

13

unichr(x)

Converts an integer to a Unicode character.

14

ord(x)

Converts a single character to its integer value.

15

hex(x)

Converts an integer to a hexadecimal string.

16

oct(x)

Converts an integer to an octal string.


BoyWhoCode: Great
hardikmishra200: thanks
Similar questions