formatting tag

8 questions


1 answers
417 views
0
Questions about advanced usage of string formatting

''' 3x 12-------- 36'''I'm trying to express this expression in code. I've tried the bottom four#try1a=3b=12print('%8d' %a)print('%-6s%-1d'%('x',b))print('--------')print('%8d'%(a*b))#try2a=3b=12pri...

2 years ago

1 answers
85 views
0
What do you call an operator?

How does the next code run?It's my first time seeing it in C grammar when I think it's going well in GCC ㅜㅜWhere's that thing?What's that called?#include <stdio.h>int main(){ int x = 10; while (...


1 answers
128 views
0
I'd like to add a space on the right according to the length when printing.

To fill in the first 0: >>> print '%06d'%4'000004'This is what I know'hi 'How do I add spaces back together? str+*number I know we can write together.


1 answers
154 views
0
How do I get the date and time on Android?

I'd like to receive the date and time set on the device with the code, so what can I do?


1 answers
142 views
0
[python] Formatting only floating numbers among Dictionary values

I'm a beginner at Python. ;;;;;;I received data from two places through API and coded it with Python.One of them is a string as shown{A:TEST, B: 121212.146466}One place is a dictionary as shown below{...


1 answers
151 views
0
Python string format: %s.format()

The Python 2.6 introduced str.format() function seems to be somewhat different from how % is used. What is the best way to use it in what situation?The examples below are examples of each method, both...


1 answers
94 views
0
Methods such as Sprintf in Java

Printf has been added since Java 1.5. But I don't know how to print it out as a string instead of a file like sprintf does in c Please tell me how to do it.

2 years ago

1 answers
87 views
0
Is there a way to proofread indent in vim?

Sometimes, if you write while or if incorrectly and erase it,It's annoying because I have to indent them one by one.There's an automatic indentation in the visual studioIsn't there a function like tha...

2 years ago

© 2024 OneMinuteCode. All rights reserved.