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

本站现有博文332篇,共被浏览870098

本站已经建立2578天!

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