<jupyter_start><jupyter_text>Q1. What are the new features added in Python 3.8 version?Positional-only parameters(/)There is a new function parameter syntax “/” which indicates that some function parameters must be specified positionally and can’t be used as keyword arguments.Assignment Expressions(:=)This operator is used to assign and return a value in the same expression. This removes the need for initializing the variable upfront.f-strings now support “=”This string formatting mechanism is known as Literal String Interpolation or more commonly as F-strings (because of the leading f character preceding the string literal). The idea behind f-strings is to make string interpolation simpler. Python 3.8 allows the use of the above-discussed assignment operator and equal sign (=) inside the f-strings.reversed() works with a dictionary Unlike Python 3.7, now in Python 3.8, the built-in method “reversed()” can be used for accessing the elements in the reverse order of insertion.No parentheses for return and yield statements ‘yield’ and ‘return’ statements do not require parentheses to return multiple values.pow() function In the three-argument form of pow(), when the exponent is -1, it calculates the modular multiplicative inverse of the given value.Syntax Warning If you miss a comma in your code such as a = [(1, 2) (3, 4)], instead of throwing TypeError, it displays an informative Syntax warning.  Q2. What is monkey patching in Python?In python, monkey patching refers to run-time modifications of a class or module. In Python, we can actually change the behavior of code at run-time.  Q3. What is the difference between a shallow copy and deep copy?In python, when we use = operator, it doesnot create a copy of the object. It just creates the variable, which shares a reference to the same memory location. This is called as shallow copy. In deep copy, new object is a copy of old object and it is created at different memory address and any changes made to new object won't be reflected in old object.  Q4. What is the maximum possible length of an identifier?The maximum possible length of an identifier is not defined in Python. It can be any number.  Q5. What is generator comprehension?It is like a list comprehension but it returns an iteraor. We use () instead of [] to achieve this.<jupyter_code>numbers = (i for i in range(5))

print(numbers)

print(next(numbers))
print(next(numbers))
print(next(numbers))
print(next(numbers))
print(next(numbers))<jupyter_output><generator object <genexpr> at 0x000001C0F97409C8>
0
1
2
3
4
{'fraction_non_alphanumeric': 0.056338028169014086, 'fraction_numerical': 0.01486697965571205, 'mean_word_length': 4.864678899082569, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '159668', 'license': 'MIT', 'n_tokens_mistral': 669, 'n_tokens_neox': 618, 'n_words': 381, 'path': 'Python_Advance_Assignment_15.ipynb', 'repo_name': 'raiajit022/Python-Advance-Assignment', 'size': '2556'}