online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
# Method_#1 by slicing names = ['A12.txt', 'B34.txt', 'C45.txt'] # discard '.txt' names = [ filename[:-4] for filename in names] print( names ) # ----------------------------------------- # Method_#2 by token splitting names = ['A12.txt', 'B34.txt', 'C45.txt'] # split by '.', and choose the first token names = [ filename.split('.')[0] for filename in names] print( names )

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue