Set in Python is an unordered and non-indexed collection of elements that are non-duplicate. It is a Mutable data-type. Creating a Set: a) Using a { }: Set can be created using curly brackets, serparated by comma. Output: {‘d’, ‘b’, ‘c’, ‘e’, ‘a’} b) Using a set() function: Set can be created using set() built-in […]
Author: Priya Bisht
Operators in Python
Operators are used to performing operations on values. Operators in Python are divided into the following categories : Arithmetic operators Assignment operators Logical operators Comparison operators Identity operators Membership operators Bitwise operators Arithmetic operators: These operators are used to perform mathematical operations (addition, subtraction, multiplication, division) on numerical values. “+”: This operator is used to […]