From 3ffb8256ae007b55df71f63de66428b51f64a003 Mon Sep 17 00:00:00 2001 From: Meisyarah Dwiastuti Date: Tue, 31 Oct 2017 09:54:09 +0100 Subject: Add data type checking examples --- python.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python.html.markdown') diff --git a/python.html.markdown b/python.html.markdown index 946cbc0c..89fa7046 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -363,6 +363,12 @@ filled_set | other_set # => {1, 2, 3, 4, 5, 6} # Check for existence in a set with in 2 in filled_set # => True 10 in filled_set # => False +10 not in filled_set # => True + +# Check data type of variable +type(li) # => list +type(filled_dict) # => dict +type(5) # => int #################################################### -- cgit v1.2.3