top of page
Search
  • Writer's pictureHarshit Sharma

More Function Types

Dictionaries:

These are the other type available in the python which enables us to give value of integer keys within a range.Dictionaries are indexed in same way as lists using square bracket containing keys.

The objects which are immutable objects can only be used as keys to dictionaries.Immutable objects are those which cannot be changed.

Dictionary function: Dictionary keys can be assigned to different values and a new dictionary key can be assigned a value.

We can also used in and not function in dictionary to check whether a key is available in dictionary.

The other function available is get which is used to return the value of index.If it is not found it will return the value none.

Tuples: Tuples are similar to list but they cannot be changed.They use paranthesses.

We cannot assign a value to a tuple as it causes type error.We can define a tuple without paranthesses just separate with comma

String functions:

Join,Replace, startswith and endswith,Lower, upper,Split

Numeric functions: min,max,abs,sum

0 views0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page