Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Document Organizer | Automating Legal Document Processing
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Legal Professionals

bookChallenge: Document Organizer

When you want to automate the organization of legal documents in Python, you can start by using a hardcoded list of document names and their types. This means you define the data directly in your script, rather than reading it from a user or a file. To organize this data, you will build a dictionary where each key is a document type (such as contract or memo) and the value is a list of file names belonging to that type. After constructing this dictionary, you can display the results by printing the dictionary to the console. This approach helps you quickly see how your documents are grouped by type and can serve as a foundation for more advanced automation tasks.

Завдання

Swipe to start coding

Write a script that organizes a hardcoded list of legal document names by their type and prints the resulting dictionary.

  • Use the provided documents list, where each element is a tuple containing a document name and its type.
  • Build a dictionary where each key is a document type and the value is a list of document names with that type.
  • Return the organized dictionary from the function.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 5
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: Document Organizer

Свайпніть щоб показати меню

When you want to automate the organization of legal documents in Python, you can start by using a hardcoded list of document names and their types. This means you define the data directly in your script, rather than reading it from a user or a file. To organize this data, you will build a dictionary where each key is a document type (such as contract or memo) and the value is a list of file names belonging to that type. After constructing this dictionary, you can display the results by printing the dictionary to the console. This approach helps you quickly see how your documents are grouped by type and can serve as a foundation for more advanced automation tasks.

Завдання

Swipe to start coding

Write a script that organizes a hardcoded list of legal document names by their type and prints the resulting dictionary.

  • Use the provided documents list, where each element is a tuple containing a document name and its type.
  • Build a dictionary where each key is a document type and the value is a list of document names with that type.
  • Return the organized dictionary from the function.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 1. Розділ 5
single

single

some-alt