Simple and basic question on programming languages. Currently focusing on python and R.

Joined October 2021
What will be the output of following code in #python? ```python a = {1, 2, 3} b = {1, 2, 3} print(*(a + b)) ```
33%{2, 4, 6}
33%[2, 4, 6]
33%Error
0%{1, 2, 3}
3 votes • Final results
1
1
2
327
Python Question A Day retweeted
The zip function in #Python is a built-in function that takes two or more iterable objects and returns an iterator that generates a series of tuples where each tuple contains one element from each of the input iterables.
1
1
2
1,076
What will be the output of following code in #python? ``` x = [1, 2, 3, 4, 5] a = *x, print(type(a)) ```
80%List
20%Tuple
0%ValueError: too many valu
0%Int
5 votes • Final results
1
1
258
Any pytest related tool that autocompletes the test cases? ex.: tests/test_potato.py::test_potato I want test_potato to be autocompleted.
2
8
1,530
github copilot? At least, there marketing pitch promises to write test cases automatically.
1
117
#Python Pop Quiz 🐍❓ Which of the following imports doesn't work without installing a package? A) import urllib B) import requests C) import http D) import json
34
7
2
64
34,357
if i had to take a guess, it would be option C
1
13
Java's son
JSON. What is it? A thread 🧵👇
131
Hi #python tutors, with chatGPT (and other LLMs in general), do you think people will be more interested in learning about programming languages (especially python) or less? @driscollis @PythonWithRune @mathsppblog @realpython @clcoding @RealBenjizo
1
4
3,531
I have been using it, and can definitely say, it lives up to it's name.
44
Do you add comments to your #Python 🐍 code? Why or why not?
40
2
3
31
25,153
can't imagine using copilot without comments
1
42
Are you a Data Scientist or ML Engineer ? What has changed in your job since ChatGPT arrived or how are you leveraging it ?
16
7
48
17,365
A lot less googling and jumping through stackoverfkow pages.
3
211
What are your top three tips for junior developers?
37
6
58
32,362
Don't directly jump to google as soon as you encounter the problem. Spend some time to solve the problem, if not programmatically, at least logically. Pen and paper are best for this.
1
1
240
Also make an attempt to a think through, why a problem is a problem, (or what could be the cause). This will greatly improve your debugging skills, and more often than not you will be able to solve issues without debugging.
1
9
What's the best #Python tip you've heard or learned recently?
15
3
1
45
22,288
While I do love the shorten version, keep in mind that 0 and empty values are Falsey by Python but might be a valid value Saw an issue where this shortcut was used for battery voltage and dead battery issues were being treated as a communication issue.
1
1
108
Yes, I see your point. Mostly I use this shortcut to handle None, but yeah you are right
2
52
Not exactly synonymous... Your first one for the example to be consistent is to make it `if not x` instead of `if x is None`
1
1
102
I don't see the difference, can you explain with an example?
1
1
50