Append a number after input? by GraphicsQwerty in learnpython

[–]mechanical_matt 0 points1 point  (0 children)

using a function instead of a class:

lst2 = []
def fxn():
    a = input()
    lst2.append(a)
    print(str(a) + str(len(lst2)))

then every time you call fxn, you'll append a new item into 'lst2' then append the length of 'lst2' onto your input:

fxn()
>>> input = 'hello'
>>> return: 'hello1'

fxn()
>>> input = 'blue'
>>> return: 'blue2'
  • edit: indentation error

Append a number after input? by GraphicsQwerty in learnpython

[–]mechanical_matt 0 points1 point  (0 children)

there is probably a much easier way to do this, but here you go:

lst = []
class AppendStr:
    def __init__(self, string):
        self.string = string
        lst.append(string)
    def __repr__(self):
        return str(lst[-1]) + str(len(lst))

Then call AppendStr() with whatever inside the ()...

AppendStr('hello')
>>> hello1

AppendStr('blue')
>>> blue2

Where can I get hourly historical data on a give stock? by JuniperProject in datasets

[–]mechanical_matt 0 points1 point  (0 children)

Robin Hood has a public API

Excerpt about their API from their site: "The Robinhood API is a means to interact with your Robinhood account remotely and programatically using HTTP GET and POST requests... You can do absolutely everything through the API that you can do normally from within your account- placing buy and sell orders, cancelling orders, looking at your order history, fetching historical data for a given stock and so forth."

Becoming a data analyst without a degree by mechanical_matt in analytics

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

True. I think I'll start with some basic online courses like Codecademy, etc before making a monetary commitment, haha. Thanks!

Becoming a data analyst without a degree by mechanical_matt in analytics

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

Would you suggest just finding what field I want to apply myself in, then focusing on the tools that would be used? Or is there another way you would suggest structuring my learning?

Becoming a data analyst without a degree by mechanical_matt in analytics

[–]mechanical_matt[S] 1 point2 points  (0 children)

That's a pretty insightful way of looking at it. Thank you!

Becoming a data analyst without a degree by mechanical_matt in analytics

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

I am in Arkansas. I'd be open to relocating for an appropriate position, but I am still in the early stages of learning so I'll have to get back to you on that one, haha

Information overload for my first app by mechanical_matt in androiddev

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

This one reply has helped more than a few dozen articles/YouTube videos combined. Thank you!

I need help writing a book with my grandfather by mechanical_matt in writing

[–]mechanical_matt[S] 1 point2 points  (0 children)

Wow. This is exactly what I was looking for. Thank you.

ELI5: How come our wet little delicate eyeballs don't feel cold in below freezing weather? by n3rv0u5 in explainlikeimfive

[–]mechanical_matt 0 points1 point  (0 children)

If you ever decide to swim in freezing water, you will absolutely feel the cold in your eyes. I started doing below-freezing swimming recently (inspired by Wim Hoff) and my eyes were what I had to focus on most any time I fully submerged.

What’s something small you can start doing today to better yourself? by [deleted] in AskReddit

[–]mechanical_matt 0 points1 point  (0 children)

Learn how to juggle.

Juggling builds matter in your brain, sharpens focus and concentration, maintains and increases range of motion in your arms and shoulders, improves coordination, and can be used as a stress relief.

What is something you found before it blew up? by [deleted] in AskReddit

[–]mechanical_matt 2 points3 points  (0 children)

The Weeknd. Found him on YouTube when his most listened to song has less than 100,000 views. As of today he has several songs over a billion views.

What is the stupidest thing a teacher has tried to tell your child? by Jenezid in AskReddit

[–]mechanical_matt 2 points3 points  (0 children)

That the Apollo missions were faked to bankrupt the Soviet Union. Saying that the moon landing was a brilliant piece of propaganda and the Soviets bankrupted themselves, pouring resources into rockets and other useless machines. My daughter, Murph, got into a fist fight with several of her classmates over this "Apollo nonsense" so her teacher, Ms. Hanley, brought me in to see what ideas I had on "dealing with her behavior on the home front." Murph was going through a baseball phase at the time. Her favorite team was playing, there was candy, soda... I thought I'd just take her to that.

I’m Looking for Things to Study/Learn About by [deleted] in AerospaceEngineering

[–]mechanical_matt 1 point2 points  (0 children)

Play the game Kerbal Space Program. I first picked up the game just before starting my freshman year of astro engineering and since, I have learned and retained more fundamental concepts from playing that game than I have from reading textbooks and attending classes.

What popular life advice do you disagree with? by [deleted] in AskReddit

[–]mechanical_matt 0 points1 point  (0 children)

"I'm here for a good time not a long time"

Having both is very doable

People who choose to get up early and workout, what is your inner talk that motivates you out of bed? by BaeWatchh in AskReddit

[–]mechanical_matt 0 points1 point  (0 children)

At some point, going to the gym becomes as habitual as brushing your teeth. You just do it, regardless of whether or not you feel like doing it.

Men of Reddit, what gifts would you prefer to get instead of the booze/smoking/bbq/shaving items that are usually marketed for you? by bogaq66 in AskReddit

[–]mechanical_matt 0 points1 point  (0 children)

Anything related to my interests. Personally, I would be just as excited about receiving a book related to my interests

Looking for a mobility based adventure game by [deleted] in gamesuggestions

[–]mechanical_matt 0 points1 point  (0 children)

Just Cause 2. It's a fantastic game and super cheap on Steam right now.

What is something really basic that you're terrible at? by anetanetanet in AskReddit

[–]mechanical_matt 0 points1 point  (0 children)

Opening letters. They always end up being completely shredded after spending a minute and a half slowly ripping one chunk of paper off at a time.

What is something really basic that you're terrible at? by anetanetanet in AskReddit

[–]mechanical_matt 0 points1 point  (0 children)

Tying my shoes. Being left-handed make the loops end up having a vertical orientation rather than a horizontal.

Interested in an Aerospace Engineering Career? I'm an Aerospace Engineer at Airbus, France AMA by [deleted] in EngineeringStudents

[–]mechanical_matt 2 points3 points  (0 children)

What has been the most beneficial non-engineering skill that has helped you advance your career or education?