Thursday, October 21, 2021

Python Data Structures

Python Data Structures and Boolean

  • Boolean
  • Boolean and Logical Operators
  • Lists
  • Comparison operators
  • Dictionaries
  • Tuples
  • Sets


Boolean Variables

Boolean values are the two constant objects False and True.

They are used to represent truth values (other values can also be considered false or true).

In numeric contexts (for example, when used as the argument to an arithmetic operator), they behave like the integers 0 and 1, respectively.

The built-in function bool() can be used to cast any value to a Boolean, if the value can be interpreted as a truth value

They are written as False and True, respectively.





List:

list is a data structure in Python that is a mutable, or changeable, ordered sequence of elements. Each element or value that is inside of a list is called an item. Just as strings are defined as characters between quotes, lists are defined by having values between square brackets [ ]



SETS:








No comments:

Post a Comment

"🚀 Delta Lake's Vectorized Delete: The Secret to 10x Faster Data Operations!"

"🚀 Delta Lake's Vectorized Delete: The Secret to 10x Faster Data Operations!" Big news for data engineers! Delta Lake 2.0+ in...