goodbooks-10k | Ten thousand books , six million ratings | Recommender System library
kandi X-RAY | goodbooks-10k Summary
kandi X-RAY | goodbooks-10k Summary
Ten thousand books, six million ratings
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of goodbooks-10k
goodbooks-10k Key Features
goodbooks-10k Examples and Code Snippets
Community Discussions
Trending Discussions on goodbooks-10k
QUESTION
I have an assignment to make a personal book inventory my lecturer suggested I use dictionary.I have two dictionaries with the same structure,but one that has all the books from this (mainLib in the code) and the other is the inventory that the user adds to(myLib). I used original_title as keys for the dictionary.
The problem is this code works for sorting book titles alphabetically in myLib, but when I try to use with the larger dictionary ,mainLib, I get TypeError: '<' not supported between instances of 'float' and 'str'
.
I want to display all the books titles(keys) in mainLib{} in alphabetiacal order on the Output widget.
ANSWER
Answered 2020-Apr-16 at 21:53Dictionary keys are not all the same type, in this case, the best would be to set everything to string for example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install goodbooks-10k
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page