Back

Sanskar

Keen Learner and Exp... • 2m

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

Image Description

Sanskar

Keen Learner and Exp... • 15d

Day 1 of learning Data Science as a beginner. Topic: data science life cycle and reading a json file data dump. What is data science life cycle? The data science lifecycle is the structured process of extracting useful actionable insights from raw

See More
2 Replies
2
9

Shubham

Fearless • 1m

🚀 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... • 2m

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... • 2m

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 • 10m

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 • 1m

🚀 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 • 26d

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

Sanskar

Keen Learner and Exp... • 10d

Day 5 of learning Data Science as a beginner Topic: Using NumPy in Data Science Python despite having much advantages (like being beginner friendly, easy to read) is also famous for its one limitation i.e. it is slow. We don't really feel much abou

See More
Reply
9

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