---
# System prepended metadata

title: ':snake:Python Class - 1'

---

# :snake:Python Class - 1
### :dart: Type function

**Type function return the type of a variable**
###### Exaple

```python=
a=15/5
b=15//5
type(a)
type(b)
```
#### :beetle: Output -
##### `<class 'float'>`
##### `<class 'int'>`
:::info
:bulb: **Note:** In Python double slash (//) use as  “floor” division (rounds down to nearest whole number).
:::

---

### :dart:Print Function
###### Example
```python=
print(a)
print(b)
```

:::info
:bulb: ** Note: ** The print() function prints the specified message to the screen, or other standard output device.
:::

**To Concatinate Two String use below syntex or you can use '+' also.**
```python=
str = "I love my"
name = "India"

print(str, name)
```

#### :beetle: Output
##### `I love my India`


:::info
:bulb: **Note:** Add space between veriables automaticaly or you can use the 'sep' as an extra paremeter, Also you can use 'end' paremeter to append something at the end.
:::

```python=
print(str,name, sep=" ", end="@")
```
#### :beetle: Output
##### `I love my India@``

---
### :dart: DIR function
###### Example
```python=
a=5
b='Some Text'
dir(a)
dir(b)
```
*:bulb: Return All Function and Member veriable of the perticular call of the given veriable.*

---
### :dart: HELP function
###### Example
```python=
a=5
help(a.bitlength)
```

:::info
:bulb: **Note:** Display help of a function.
:::

---
### :dart: ID Function
###### Example
```python=
a=10
id(a)
```
:::info
:bulb: **Note:** Return Unique Id of an Identifier (Veriable).
:::

---
### :dart: IS Function
###### Example
```python=
a = 4
b = 4
a is b

x = 5.6
y = 5.6
x is y
```
#### :beetle: Output
##### `True`
##### `False`

:::info
:bulb: **Note:** In the above example, 1st 'IS' Function returns TRUE but the 2nd 'IS' function returns False, Because, Int is immutable and Flote is Mutable. It means, In Integer if the same value is used for two different Identifier it points the same memory location But in Float every Identifier point different memory location That's why in 1st Example it Return TRUE and in 2nd one its return False.
:::

---
### :dart: Multiline String
###### Example
```python=
a = """ This is
a multiline
Text"""
```
:::info
:bulb: **Note:** In Python use tripple single (''') code or tripple double code (""") for Multiline string.
:::
---
[Python class-2]