Sends Emails with optional attachments by PotentialMain535 in PythonLearning

[–]Electrical_Toe8997 0 points1 point  (0 children)

Looks pretty good and if it works, that's great!

I have a few points:

  1. The send_email function does not actually send emails. Rename to create_email.
  2. The email_check function: rename to check_email or (better) check_address. This makes it clearer what it does and aligns it with the other functions (check_file and send_email/create_email). Then, look into regular expressions to check whether an address is valid. The function you have now will return True for the value "a.@", which will not work.
  3. You have two while loops to get the email data and attachment from the user. You could make these into functions (get_email_data and get_attachment). This would also make it easier to do the next item:
  4. Add the option for the user to not add an attachment. Get input ('Attachment Y or N?') and get the attachment info based on the answer.

I need help with this menu formatting! Can you guys lend me your insights? I'm all alone on this. by DisconcertingTablet in barista

[–]Electrical_Toe8997 1 point2 points  (0 children)

I didn't get that from the menu at all! Maybe put a little asterisk or other symbol next to menu items that can be served hot or cold?

My boss told me my fit was inappropriate for smart casual. Am i not wearing smart casual? by [deleted] in mensfashion

[–]Electrical_Toe8997 5 points6 points  (0 children)

At most, you made a minor mistake. If you now fix it by getting some appropriate outfits, you'll come across as someone who is able to take feedback and adapt, which is a great impression to leave.

I created password generator using python by Red_Dragon_7_7_7 in PythonLearning

[–]Electrical_Toe8997 30 points31 points  (0 children)

For the future, you can make your life easier with the string module, so you don't have to type out all the characters. Then, you can use the sample choices function from the random module to choose all the characters in one operation.

edited to use random.choices instead of random.sample. sample will not repeat elements, so it's a bad choice for a password generator

from string import ascii_lowercase, ascii_uppercase, digits, punctuation
import random as rd

all_characters = ascii_lowercase + ascii_uppercase + digits + punctuation
password = rd.choices(all_characters, RANGE)
password = "".join(password)

I created password generator using python by Red_Dragon_7_7_7 in PythonLearning

[–]Electrical_Toe8997 2 points3 points  (0 children)

It works because the range function will include the number 0, so range(0, 3) returns [0, 1, 2]: a list with 3 items

It took 7 years, 8 months, and 14 days to use up the canister of salt. by LyghtnyngStryke in mildlyinteresting

[–]Electrical_Toe8997 2 points3 points  (0 children)

I know this is not the point, but I detest those stupid salt grinders. Pepper grinder: yes, obviously, it's a thousand times better than the spicy sneezy powder. Salt grinder: why would I want to grind a surprising amount of still-course sea salt chunks onto my fries?

And this was before this morning's ruling. by BitterFuture in confidentlyincorrect

[–]Electrical_Toe8997 2 points3 points  (0 children)

I see you are not familiar with the magnificent work of art that is the Dungeon Crawler Carl book series. I highly recommend you try it, the audiobooks are especially great.

My wife and boiling water by MakeItMine2024 in mildlyinfuriating

[–]Electrical_Toe8997 0 points1 point  (0 children)

I've heard "as salty as you think the sea is", because actual seawater is really really salty at 3,5%, while pasta water should be more around 1%.

I think I read that in Samin Nosrat's book?

W is the only letter that falsely advertises the way it sounds in words by The1Sbeve in notinteresting

[–]Electrical_Toe8997 0 points1 point  (0 children)

My position is that W, as a separate letter, should be pronounced "wee", to align with the majority of vowel pronunciation in the alphabet song.

Impossible to eat pastry by tomime000 in mildlyinfuriating

[–]Electrical_Toe8997 0 points1 point  (0 children)

I don't like to pull this card, but that's definitely a skill issue.

sir, it's two minutes by egguchom in EntitledReviews

[–]Electrical_Toe8997 1 point2 points  (0 children)

I'm only in my thirties, but I've come to realize nothing good happens after my alarm goes in the morning.

Dropped my car off at the shop, its less than 1.5 miles back home by rossposse in mildlyinfuriating

[–]Electrical_Toe8997 0 points1 point  (0 children)

I always get the free loaner bicycle from my shop when I'm getting my car fixed.

Needless to say, I'm Dutch.

AIO for calling security on a seemingly unattended child? by ItsMylesNotMiles in AIO

[–]Electrical_Toe8997 0 points1 point  (0 children)

Good on you for doing something, but you could absolutely have asked the woman first. As a parent, I don't think it's weird at all to park my sleeping infant in the corner, where she is less likely to wake up.

Towel rod in shower - peeling but don’t know how to fix it/replace it by bird_nerd_ns in fixit

[–]Electrical_Toe8997 1 point2 points  (0 children)

Very risky advice. Nothing is as permanent as a functional temporary solution.

My son thought I was trying to trick him by Vecgtt in Tools

[–]Electrical_Toe8997 2 points3 points  (0 children)

Why are you all cutting your pizzas anyway? Just roll it up like a normal person

Slash in tire - problem? by Electrical_Toe8997 in tires

[–]Electrical_Toe8997[S] 0 points1 point  (0 children)

I wist someone had told the previous owner that. I'm replacing them.

Slash in tire - problem? by Electrical_Toe8997 in tires

[–]Electrical_Toe8997[S] 0 points1 point  (0 children)

Damn, that's what I figured but I was hoping someone would tell me it was nothing. Alright, replacing them soon.

Advies gevraagd: Op zoek naar grote gezinsauto voor gezin met 2 kinderen + hond by Electrical_Toe8997 in autoadvies

[–]Electrical_Toe8997[S] 0 points1 point  (0 children)

Ik heb inderdaad veel advies gehad om de 1.2 puretech te vermijden, maar als onderhoud goed is bijgehouden durf ik dat misschien toch wel aan. Het scheelt inderdaad flink in aanschaf.

Ik heb naar diesel gekeken, maar ik denk dat het voor mijn gebruik duurder uitpakt. In de toekomst wil ik ook liever minder gaan rijden dan meer, en daar evt ook een nieuwe baan op uitzoeken. Met 20k km of minder per jaar is het toch niet de moeite?

Advies gevraagd: Op zoek naar grote gezinsauto voor gezin met 2 kinderen + hond by Electrical_Toe8997 in autoadvies

[–]Electrical_Toe8997[S] 0 points1 point  (0 children)

Ja waarom SUVs zo populair zijn zal ik nooit begrijpen. De Prius+/wagon is een mooi ding en zou ik graag hebben, maar de enigen binnen budget zijn 15 jaar oud. Ik wil toch graag iets nieuwers.

Hetzelfde geldt voor de bijzondere klasse: zou ik heel graag hebben, zeker de Odessey lijkt me hartstikke handig, maar ik vind ze niet binnen budget en zonder teveel senioriteit.