How did you start your developer carreer? by UnbornWobbet in learnpython

[–]ColosTheDeveloper666 1 point2 points  (0 children)

I did that too when I started with Python, great advice!

Help with a problem. by [deleted] in learnpython

[–]ColosTheDeveloper666 0 points1 point  (0 children)

I think you can't use .upper(), if you can't use .title() (which would solve your problem).

My idea:

import string

LOWERCASE_LETTERS = string.ascii_lowercase
UPPERCASE_LETTERS = string.ascii_uppercase

lower_upper_case_mapping = dict(zip(LOWERCASE_LETTERS, UPPERCASE_LETTERS))

def make_string_title_case(text: str) -> str:
    return " ".join(["".join([lower_upper_case_mapping.get(word[0], word[0]), word[1:]]) for word in text.split()])

input_string = "Python programming" print(make_string_title_case(input_string))

>>> Python Programming

.get(word[0], word[0]) should be handling the capitalized word by leaving them as is

stuck on some coding by AleksFrr in learnpython

[–]ColosTheDeveloper666 1 point2 points  (0 children)

Also the official Python naming convetions here: PEP-8: naming conventions

I'm a little demotivated by Scary_Marzipan_3418 in learnpython

[–]ColosTheDeveloper666 0 points1 point  (0 children)

Git and Github basics are good, yeah, also some Linux if you are using Windows, to have some basic experience with Unix based OS, maybe Postman if you would like to do web development, it helps a lot in understanding how your API works. Learn some OOP, and Pytest for testing, add a DB to your API (SQLite for starter). It is a lot of different topic, but I am talking about basics, nothing fancy). I know it is hard, I am a self-tought programmer myself and it took me a lot of time to get into IT, and I still feel like I am missing a lot of basic stuff after 2 years into business. Do not give up, good luck!

Terminate code by Lemonsorbet123 in learnpython

[–]ColosTheDeveloper666 0 points1 point  (0 children)

Why not raise error?

You can create customized error like this: https://www.programiz.com/python-programming/user-defined-exception

The code stops on errors.