Skip to main content

Personally tiny useful Python tips

Project description

Personally tiny useful Python tips

License Docs PyPI version fury.io

Version

0.0.1 - datetime object & string Integration management in Python

© 2024 GitHub : https://github.com/YongBeomKim

with open(file_path, 'r') as f: file_content = f.readlines()

new_file_content = [] for line in file_content: if line.startswith(f"{list_name} = "): # 해당 List 변수 line을 찾아서 내용 수정 list_str = line.split("=")[1].strip() list_variable = ast.literal_eval(list_str)

    if isinstance(list_variable, list):
        modified_list = modification_function(list_variable)
        new_file_content.append(f"{list_name} = {str(modified_list)}\n")
    else:
        print(f"변수 '{list_name}'이(가) List 형태가 아닙니다.")
        return

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytip-0.0.12.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytip-0.0.12-py2.py3-none-any.whl (28.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytip-0.0.12.tar.gz.

File metadata

  • Download URL: pytip-0.0.12.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pytip-0.0.12.tar.gz
Algorithm Hash digest
SHA256 752b25484c6847c260897b8746f7b0cd22b2c214a0caecf5fe02215fcfc9280f
MD5 8173ffead1481b8e13a95c990f532228
BLAKE2b-256 0d343bd956bc5459959aa14cbe1ffb59a45602eeabf59e5ab034abe78f5d55c1

See more details on using hashes here.

File details

Details for the file pytip-0.0.12-py2.py3-none-any.whl.

File metadata

  • Download URL: pytip-0.0.12-py2.py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pytip-0.0.12-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 56e1ae31f4be3eee96ea71424059376245464be3475abe7f5a12c7ba2c1000f7
MD5 b370d955098ce1791144691ddf8aa911
BLAKE2b-256 b1d7d4fb15b12d8a6e59feb91e0cf120e8f3eb988e49b36274e49eab3051efd8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page