Skip to content

Commit e7848bd

Browse files
committed
Added table for type cast functions
1 parent 92e5599 commit e7848bd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎docs/python-tutorial/chapters/04-built-in-functions-pt01.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,13 @@ result = num1 + num2
193193

194194
print("The sum of", num1, "and", num2, "is", result)
195195
```
196+
197+
Similarly, we can cast data to other types, such as strings and booleans, by calling their
198+
respective functions.
199+
200+
| Data Type | Function Call |
201+
| ---------- | ------------- |
202+
| String | `str()` |
203+
| Integers | `int()` |
204+
| Floats | `float()` |
205+
| Boolean | `bool()` |

0 commit comments

Comments
 (0)