formulahendry / formulahendry/vscode-code-runner
Python incorrect output - tabbed lines not printing properly
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I believe this hasn't been pointed out before and hence posting this issue here.
While executing some tabbed input (string such as:
```python
n = 17
for number in range(1, n+1):
print(number, '\t' +
oct(number).lstrip("0o"), '\t' +
hex(number).lstrip("0x").capitalize(), '\t' +
bin(number).lstrip("0b"))
```
The output prints like this:
```python
(1, '\t1', '\t1', '\t1')
(2, '\t2', '\t2', '\t10')
(3, '\t3', '\t3', '\t11')
(4, '\t4', '\t4', '\t100')
(5, '\t5', '\t5', '\t101')
(6, '\t6', '\t6', '\t110')
(7, '\t7', '\t7', '\t111')
(8, '\t10', '\t8', '\t1000')
(9, '\t11', '\t9', '\t1001')
(10, '\t12', '\tA', '\t1010')
(11, '\t13', '\tB', '\t1011')
(12, '\t14', '\tC', '\t1100')
(13, '\t15', '\tD', '\t1101')
(14, '\t16', '\tE', '\t1110')
(15, '\t17', '\tF', '\t1111')
(16, '\t20', '\t10', '\t10000')
(17, '\t21', '\t11', '\t10001')
[Done] exited with code=0 in 0.041 seconds
```
Which in my experience is not the correct output. I think the brackets need to be removed but most importantly the output should not display '\t' as output.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.