TGViewer
Channel Public Channel
Python Learning

Python Learning

@python_bds

Python learning resources

Beginner to advanced Python guides, cheatsheets, books and projects.

For data science, backend and automation.
Join πŸ‘‰ https://rebrand.ly/bigdatachannels

DMCA: @disclosure_bds
Contact: @mldatascientist
Subscribers
5.74K
Photos
587
Videos
2
Links
132

Showing posts older than #583 Β· Back to latest

Older Posts 20 shown
Post #582 1.71K
  • ❀ 2
  • πŸ‘ 1
  • πŸ”₯ 1
Post #580 1.82K
  • πŸ‘ 2
  • ❀ 1
Post #578 1.81K
  • ❀ 1
  • πŸ‘ 1
Post #576 2K
Top Python Modules
  • πŸ‘ 9
Post #575 1.71K
  • ❀ 3
Post #573 1.82K
Deleting Tuples

Tuples are immutable and cannot be deleted. You cannot delete or remove items from a tuple. But deleting tuple entirely is possible by using the keyword

del

Slicing of Tuple

To fetch specific sets of sub-elements from tuple or list, we use this unique function called slicing. Slicing is not only applicable to tuple but also for array and list.

x = ("a", "b","c", "d", "e")
print(x[2:4])


The output of this code will be (β€˜c’, β€˜d’).

πŸ”— Read Online

#Python #python_3
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–
Join @python_bds for more cool data science materials.
*This channel belongs to @bigdataspecialist group
Guru99 Python TUPLE – Pack, Unpack, Compare, Slicing, Delete, Key A Python tuple is just like a list of a sequence of immutable objects. Learn Packing, Unpacking, Comparing, Slicing and Deleting of tuples with examples in this tutorial.
  • ❀ 1
Post #572 1.52K
  • ❀ 5
  • πŸ‘ 4
Post #571 1.56K
  • ❀ 4
Post #570 1.73K
Learn R and Python Programming for Data Visualization

From Raw Data to Insightful Narratives: Creating Visual Charts

⏰ Free Online Course
🎬 video lessons
Rating ⭐️: 4.6 out 5
Students πŸ‘¨β€πŸŽ“ : 2,300
Duration ⏰ : 1hr 56min of on-demand video
Created by πŸ‘¨β€πŸ«: Pranjal Srivastava, Harshit Srivastava

πŸ”— COURSE LINK


#python #programming #R
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–
πŸ‘‰Join @python_bds for moreπŸ‘ˆ
Udemy Free Tutorial - Learn R and Python Programming for Data Visualization From Raw Data to Insightful Narratives: Creating Visual Charts - Free Course
  • ❀ 3
  • πŸ‘ 2
Post #569 1.64K
  • ❀ 2
Post #567 1.88K
Python Libraries every Data Scientist should know
  • ❀ 2
  • πŸ‘ 2
Post #566 1.74K
  • ❀ 2
Post #564 1.79K
Using tuples as keys in dictionaries
Since tuples are hashable, and list is not, we must use tuple as the key if we need to create a composite key to use in a dictionary.

Example: We would come across a composite key if we need to create a telephone directory that maps, first-name, last-name, pairs of telephone numbers, etc. Assuming that we have declared the variables as last and first number, we could write a dictionary assignment statement as shown below:

directory[last,first] = number

Inside the brackets, the expression is a tuple. We could use tuple assignment in a for loop to navigate this dictionary.

for last, first in directory:
print first, last, directory[last, first]

This loop navigates the keys in the directory, which are tuples. It assigns the elements of each tuple to last and first and then prints the name and corresponding telephone number.

Tuples and dictionary

Dictionary can return the list of tuples by calling items, where each tuple is a key value pair.

a = {'x':100, 'y':200}
b = list(a.items())
print(b)


πŸ”— Read Online

#Python #python_3
βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–βž–
Join @python_bds for more cool data science materials.
*This channel belongs to @bigdataspecialist group
Guru99 Python TUPLE – Pack, Unpack, Compare, Slicing, Delete, Key A Python tuple is just like a list of a sequence of immutable objects. Learn Packing, Unpacking, Comparing, Slicing and Deleting of tuples with examples in this tutorial.
  • πŸ‘ 4
  • ❀ 2
Post #563 1.49K
  • ❀ 2
Older posts β†’
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook β†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 β†’