Cheet Sheet:
1. List = Arrays.
List = ["One","Two","Three"];
print List[2];
2. Tuple() = List, but its cannot be changed. (Unmutable)/xyz[2]
3. Sets = Are similar to list, un-ordered collection of unqiue elements.
No, duplicates.
4. Dictionaries{} = Arrays. Un-order collections of key value pairs.
dict = {"Key":"Value"}
5. __XYZ = Is declaring local variable by adding "__"
6. pop / remove: Both do the same thing.
But implementation is different. In "pop" user needs
to give index id: xyz.pop(1) / xyz.remove("abc")
7. xyz.find("abc"): Give the location index id of the text.
8. "is": For same value, like one = two = [1,2,3] its true.
9. "in": For checking true values, "s" in "Kiwi" its false.
Python GitHub Repo: https://github.com/bornfreesoul/Python
1. List = Arrays.
List = ["One","Two","Three"];
print List[2];
2. Tuple() = List, but its cannot be changed. (Unmutable)/xyz[2]
3. Sets = Are similar to list, un-ordered collection of unqiue elements.
No, duplicates.
4. Dictionaries{} = Arrays. Un-order collections of key value pairs.
dict = {"Key":"Value"}
5. __XYZ = Is declaring local variable by adding "__"
6. pop / remove: Both do the same thing.
But implementation is different. In "pop" user needs
to give index id: xyz.pop(1) / xyz.remove("abc")
7. xyz.find("abc"): Give the location index id of the text.
8. "is": For same value, like one = two = [1,2,3] its true.
9. "in": For checking true values, "s" in "Kiwi" its false.
Python GitHub Repo: https://github.com/bornfreesoul/Python
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.