EADST

ValueError: invalid literal for int() with base 10

ValueError: invalid literal for int() with base 10 in Python.

Use eval() to avoid this error.

test = "1.234, 56.7890"
point = test.split(",")
# print(int(point[0])) ## ValueError: invalid literal for int() with base 10: '1.234'
print(int(point[0].split(".")[0])) # 1
print(eval(point[0])) # 1.234
print(int(eval(point[0]))) # 1
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
Vmess Magnet uWSGI 飞书 强化学习 Markdown 公式 CLAP Image2Text Sklearn HaggingFace WAN TensorFlow NameSilo Use Hilton Food Pillow Quantization 第一性原理 PDB Hungarian BeautifulSoup Tensor 顶会 PyCharm llama.cpp LaTeX Linux Search C++ Gemma Git Ubuntu Card COCO Anaconda Web Logo Django Quantize PyTorch Plotly 报税 Michelin v0.dev ResNet-50 FP32 SQLite ChatGPT Bin AI Random VPN RAR 搞笑 GoogLeNet Cloudreve Knowledge Bipartite 多进程 hf 净利润 FastAPI Qwen OpenCV VGG-16 mmap Transformers Excel SVR YOLO 多线程 TSV FP8 BTC CEIR GPT4 tar Permission LLM Jetson Password News git Website Pandas 音频 TTS Plate uwsgi Data Freesound FP64 Base64 CSV Clash Statistics 算法题 EXCEL Streamlit Review Disk 递归学习法 关于博主 CV 域名 TensorRT VSCode Llama LoRA 签证 Land Tracking CUDA Ptyhon Github NLTK Distillation BF16 XML CAM Input Qwen2 diffusers Dataset CTC DeepSeek Augmentation 版权 LeetCode Safetensors Hotel FlashAttention RGB SPIE Template Qwen2.5 Breakpoint Conda NLP tqdm IndexTTS2 Datetime ModelScope 云服务器 Video transformers SAM torchinfo Claude QWEN PDF Vim Nginx JSON LLAMA PIP git-lfs GPTQ API Bitcoin 图形思考法 Agent Proxy OCR Docker v2ray Translation CC Tiktoken InvalidArgumentError GIT SQL FP16 Firewall Pickle Pytorch 财报 Attention ONNX Paddle MD5 WebCrawler Domain logger Diagram HuggingFace Color UI Heatmap Miniforge Baidu GGML Python Math 阿里云 scipy 证件照 Algorithm OpenAI Bert Shortcut UNIX Crawler Animate Paper Jupyter 腾讯云 printf Mixtral Google 继承 DeepStream Windows Zip XGBoost Interview Numpy
站点统计

本站现有博文321篇,共被浏览775808

本站已经建立2466天!

热门文章
文章归档
回到顶部