Last Sync: 2022-10-04 12:30:05
This commit is contained in:
		
							parent
							
								
									3a5f5a4909
								
							
						
					
					
						commit
						67cd893512
					
				
					 2 changed files with 31 additions and 3 deletions
				
			
		| 
						 | 
					@ -1,15 +1,33 @@
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
title: Python datatypes
 | 
					title: Python data-types
 | 
				
			||||||
categories:
 | 
					categories:
 | 
				
			||||||
  - Programming Languages
 | 
					  - Programming Languages
 | 
				
			||||||
tags: [python]
 | 
					tags: [python, data-types]
 | 
				
			||||||
---
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Python datatypes
 | 
					# Python datatypes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The core datatypes are as follows:
 | 
					The core data-types are as follows:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- str
 | 
					- str
 | 
				
			||||||
- bool
 | 
					- bool
 | 
				
			||||||
- float
 | 
					- float
 | 
				
			||||||
- double
 | 
					- double
 | 
				
			||||||
 | 
					- ...
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Converting data-types
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For every data-type there is a corresponding converter method, e.g:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```python
 | 
				
			||||||
 | 
					a_string_int = "32"
 | 
				
			||||||
 | 
					as_int = int(a_string_int)
 | 
				
			||||||
 | 
					# 32
 | 
				
			||||||
 | 
					a_float_int = "32.2"
 | 
				
			||||||
 | 
					as_float = float(a_float_int)
 | 
				
			||||||
 | 
					# 32.2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					a_bool = "true"
 | 
				
			||||||
 | 
					as_bool = bool(a_bool)
 | 
				
			||||||
 | 
					# True
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										10
									
								
								Programming_Languages/Python/Stout_stin.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								Programming_Languages/Python/Stout_stin.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,10 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					title: Standard input and output
 | 
				
			||||||
 | 
					categories:
 | 
				
			||||||
 | 
					  - Programming Languages
 | 
				
			||||||
 | 
					tags: [python, data-types]
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Standard input and output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					https://www.youtube.com/watch?v=kqtD5dpn9C8&ab_channel=ProgrammingwithMosh
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue