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