From 9f2929605470ba40b5dfe717554972f18f497826 Mon Sep 17 00:00:00 2001 From: Steven Basart Date: Mon, 16 Jun 2014 14:47:43 -0400 Subject: Update python3.html.markdown fixed python 3 english sets error and editted .add comment because .add only accepts one argument --- python3.html.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python3.html.markdown') diff --git a/python3.html.markdown b/python3.html.markdown index 77811535..778076f8 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -238,7 +238,10 @@ empty_set = set() # Initialize a set with a bunch of values. Yeah, it looks a bit like a dict. Sorry. some_set = {1, 1, 2, 2, 3, 4} # some_set is now {1, 2, 3, 4} -# Add more items to a set +#Can set new variables to a set +filled_set = some_set + +# Add one more item to the set filled_set.add(5) # filled_set is now {1, 2, 3, 4, 5} # Do set intersection with & -- cgit v1.2.3