Back

Sanskar

Keen Learner and Exp...ย โ€ขย 1m

Day 19 of learning python as a beginner. Topic: JSON file (exploring surface). JSON stands for JavaScript Object Notation however it is not limited to JavaScript only. JSON is used to store and share structured data which is both readable by human and understandable by machines. It's syntax includes a list within which all the dictionary lies (JSON's data is a key value pair). For creating JSON in python you have to import json. I created a simple data base of students which can be viewed, added and deleted. I also used different types of values so that I can remember that JSON is not limited to strings only. For writing a JSON you use the function json.dump (this writes json directly to a file) while json.dumps only convert python data into json strings and does not write to file (the difference in both dump is of 's' if you are wondering). I also found out that it is not always necessary to put a def __init__ in a class when sometimes you just don't need to initialise attributes. I would appreciate your suggestions of future learning topics and challenges, I would also appreciate your thoughs regarding my code and if I have done something wrong here which didn't caught my attention.

Reply
2

More like this

Recommendations from Medial

Shubham

Fearlessย โ€ขย 14d

๐Ÿš€ Day 3/21 โ€“ My JavaScript Learning Journey Today I explored two core concepts: Loops & Strings. ๐Ÿ”น Loops in JavaScript for โ†’ classic loop with index. while โ†’ runs until a condition is true. do...while โ†’ executes at least once. for...of โ†’ best

See More
Reply
2
Image Description

Sanskar

Keen Learner and Exp...ย โ€ขย 1m

Day 10 of learning python as a beginner. Topic: File I/O You guys remeber I once created a to-do list (most probably on day 7)? many amazing people suggested that I should also put a history of tasks. At that time I was not aware about the File I/O

See More
2 Replies
3

Sanskar

Keen Learner and Exp...ย โ€ขย 1m

Day 25 of learning python as a beginner. Topic: database handling. I used to write simple programs which just showed some text in the console when I started learning python. I didn't used to store that data somewhere because I didn't know how to.

See More
Reply
Image Description
Image Description

Yash

YoYoย โ€ขย 9m

I know the basics of python language like functions, file handling, stack, etc what should I learn in python to get the fastest internship or job as freshers

4 Replies
2

Shubham

Fearlessย โ€ขย 16d

๐Ÿš€ Day 1/21 โ€“ My JavaScript Learning Journey Iโ€™ve started my 21-day challenge to learn and share JavaScript daily. ๐Ÿ”น Todayโ€™s focus: Basics, Variables, and Data Types Variables: var, let, const (different scopes & usage). Data Types: 7 primitive

See More
Reply
2

Prince Yadav

Co -founder at Trade...ย โ€ขย 1y

Prefix data structure, often referred to as a trie, is a tree-like data structure used for storing and retrieving a dynamic set of strings efficiently, particularly when dealing with prefix-based operations. #Datastructure #codingjourney Prefix Expr

See More
Reply
6

Shubham

Fearlessย โ€ขย 6d

Day 10/21 โ€“ JavaScript: Callback, Promise & Async/Await Today I learned how JavaScript handles asynchronous tasks like API calls, file loading, or timers. โšก ๐Ÿ”น Callback โ€“ a function passed into another function function fetchData(cb) { setTimeou

See More
Reply
1
Image Description
Image Description

Account Deleted

Hey I am on Medialย โ€ขย 2m

hey guys , need bit of a help I tried removing that 'edit with lovable' from .apk file with manus (I know there are better ways to do , but I'm lazy) it gave a json file in return so gave manus that .json file and asked to create into .apk (ik

See More
18 Replies
3
14

Suraj Dusane

Hey I am on Medialย โ€ขย 1y

How I Complete My 5-Day Boring Task in Less Than Half an Hour๐Ÿ‘‡๐Ÿป 1. Eureka Moment: So, I was stuck making PowerPoint slides manually, which was a real pain. Then, I had this genius idea to make things easier by automating the whole process. 2. Hun

See More
Reply
9

Download the medial app to read full posts, comements and news.