|
Python related question (I'm using Python 3). Why does the following set the items out of order? master_set = set(input("Enter your string: ").split())#Get input print(master_set) I enter the string: This is a string and get the following as output: Enter your string: this is a string {'this', 'a', 'is', 'string'} It should be: {'this', 'is', 'a', 'string'} right? Why is it out of order? edit: removing set() from the input line above fixed it. But Im still a bit confused why. Tacos Al Pastor fucked around with this message at 23:53 on Apr 16, 2014 |
# ¿ Apr 16, 2014 23:47 |
|
|
# ¿ May 17, 2024 19:26 |
|
SurgicalOntologist posted:Sets have no order. If you want order, use a list. If you want order and no duplicates, use the keys of an OrderedDict: For this particular problem, Im to read input into a set but this definitely helps as I have to take that input and add it to a dict later and keep track of the number of times the word appears using the key for that dict. Thanks
|
# ¿ Apr 17, 2014 00:10 |
|
More of a documentation question: What is the process for generating system req's for an app? (minimum). Does anyone have experience with writing these?
|
# ¿ Apr 10, 2024 18:35 |
|
TooMuchAbstraction posted:Everyone knows that system requirements are bullshit to some extent, so you shouldn't feel like you need to get them "correct". This is kind of how I feel about it too. Even a processor from 15 years ago can run a lot of applications. leper khan posted:what is the lowest spec thing youve tested it with? what is its worst case resource usage? So yeah thats the thing. Having the lowest benchmarked item to test with. Im not even sure how to deduce that without having it in hand
|
# ¿ Apr 10, 2024 21:18 |