Pythonic AI
493 subscribers
317 photos
84 videos
67 files
538 links
منابع، دوره ها، همایشها ، مقالات و میم کامپیوتر
Download Telegram
Python 3.9 got released and it comes with new cool features:

1. Dictionary union:

a = {1: 'a', 2: 'b', 3: 'c'}
b = {4: 'd', 5: 'e'}
c = a | b
print(c)

[Out]: {1: 'a', 2: 'b', 3: 'c', 4: 'd', 5: 'e'}

2. Type hinting. Allows you to write:

def sum_dict(var: dict[str, int]) -> int:
return sum(var[key] for key in var)

3. New string methods. Two new string methods for removing prefixes and suffixes have been added.

"Hello world".removeprefix("He")

[Out]: "llo world"

4. Python 3.9 uses a new parser, based on PEG instead of LL(1). Python users are not affected, but parser improvements would help to develop new language features faster.

Link

#python

@pythonicAi
پایتون بهتره یا R ؟! 🤔

#datascience #python

@pythonicAi
Join our discussion group to share your knowledge and resolve your issues in #python #machinelearning and #artificialintelligence.

با عضویت در گروه بحث و گفتگوی ما میتوانید دانش خود را با دیگران به اشتراک گذاشته و مسائل و سوالات خود در زمینه #ماشین_لرنینگ #پایتون و #هوش_مصنوعی را برطرف نمایید.

@pythonic_discussion