<jupyter_start><jupyter_text>Student Activity on Advanced Data Structure In this activity we will have to do the following tasks- Look up the definition of permutations, and dropwhile from [itertools documentation](https://docs.python.org/3/library/itertools.html) in Python- Using permutations generate all possible three digit numbers that can be generated using 0, 1, and 2- Loop over this iterator and print them and also use `type` and `assert` to make sure that the return types are tuples- Use a single line code involving `dropwhile` and an lambda expression to convert all the tuples to lists while dropping any leading zeros (example - `(0, 1, 2)` becomes `[1, 2]`)- Write a function which takes a list like above and returns the actual number contained in it. Example - if you pass `[1, 2]` to the function it will return you `12`. Make sure it is indeed a number and not just a concatenated string. (Hint - You will need to treat the incoming list as a stack in the function to achieve this)  Task 1Look up the definition of `permutations` and `dropwhile` from itertools. There is a way to look up the definition of a function inside Jupyter itself. just type the function name followed by a `?` and press `Shift+Enter`. We encourage you to also try this way<jupyter_code>### Write your code bellow this comment.<jupyter_output><empty_output><jupyter_text>Task 2Write an expression to generate all the possible three digit numbers using 0, 1, and 2<jupyter_code>### Write your code bellow this comment<jupyter_output><empty_output><jupyter_text>Task 3Loop over the iterator expression you generated before. Use print to print each element returned by the iterator. Use `assert` and `type` to make sure that the elements are of type tuple<jupyter_code>### Write your code bellow this comment<jupyter_output><empty_output><jupyter_text>Task 4Write the loop again. But this time use `dropwhile` with a lambda expression to drop any leading zeros from the tuples. As an example `(0, 1, 2)` will become `[0, 2]`. Also cast the output of the dropwhile to a list._Extra task can be to check the actual type that dropwhile returns without the casting asked above_<jupyter_code>### Write your code bellow this comment<jupyter_output><empty_output><jupyter_text>Task 5Write all the logic you had written above, but this time write a separate function where you will be passing the list generated from dropwhile and the function will return the whole number contained in the list. As an example if you pass `[1, 2]` to the fucntion it will return 12 to you. Make sure that the return type is indeed a number and not a string. Although this task can be achieved using some other tricks, we require that you treat the incoming list as a stack in the function and generate the number there.<jupyter_code>### Write your code bellow this comment<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.05642633228840126, 'fraction_numerical': 0.01044932079414838, 'mean_word_length': 5.033613445378151, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 1, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '4241', 'license': 'MIT', 'n_tokens_mistral': 762, 'n_tokens_neox': 728, 'n_words': 438, 'path': 'Lesson02/Activity03/.ipynb_checkpoints/Student Activity-checkpoint.ipynb', 'repo_name': 'RileyAfencl/DSC-540', 'size': '2871'}