0 — Test 604
Page 1 of 3
Question 1
What does "a,b,,c".split(",") return?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 2
What happens with ",".join([1, 2, 3])?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 3
What does int("3.5") do?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 4
What is the difference between "abc".find("z") and "abc".index("z")?
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 5
What does print(*[1, 2, 3], sep='-') print?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 6
What is the purpose of if __name__ == '__main__': in a Python file?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 7
In Python 3, does the variable of a list comprehension leak into the enclosing scope?
x = 10
[x for x in range(3)]
print(x)
FPSC- Programmer (BS-17) - PMD High Yield - 2026
Question 8
What is the difference between @staticmethod and @classmethod?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 9
In Python, is self a reserved keyword?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026
Question 10
What does the with statement guarantee when used as with open('f.txt') as f:?
FPSC- Programmer (BS-17) - Pakistan Meteorological Department (PMD) Model Papers - 2026